package org.stvd.repository.admin;

import java.util.List;

import org.stvd.entities.admin.UserRole;
import org.stvd.repository.base.BaseDao;

public interface UserRoleDao extends BaseDao<UserRole> {
    List<UserRole> findUserRoleByUid(String userId, String guid);
    
    UserRole findUserRole(String userId,String roleId, String guid);

    List<UserRole> findUserRoleByRoleid(String roleId, String guid);

    void insert(String userId, String[] roleIds, String guid);
    
    void changeUsersRole(UserRole userRole, String newRole, String guid);
    
    void insertUserRole(String userId, String roleId, String guid);
    
    void deleteUserRole(String userId, String roleId, String guid);

    /**
     * 根据条件获取用户角色
     * @param userId 用户ID
     * @param roleCode 角色编码
     * @param guid 平台GUID
     * @return
     */
	public UserRole getUserRoleByUesrRoleCode(String userId, String roleCode, String guid);
    
}
